home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_teo_irisdoor2.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  111 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEO_IrisDoor.cog
  4. #
  5. # Door Script
  6. #
  7. # [SXC]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.     message     startup
  14.     message     activate
  15.     
  16.     thing       idolkey
  17.     thing       idolstand
  18.     
  19.     thing       camera0
  20.     thing       target0
  21.     thing       camera1
  22.     thing       target1
  23.  
  24.     thing        door0           linkid=0 mask=0x405
  25.     thing        door1           linkid=0 mask=0x405
  26.     thing        door2           linkid=0 mask=0x405
  27.     thing        door3            linkid=0 mask=0x405
  28.     thing        door4            linkid=0 mask=0x405
  29.     thing        door5            linkid=0 mask=0x405
  30.     thing        door6            linkid=0 mask=0x405
  31.     thing        door7            linkid=0 mask=0x405
  32.     
  33.     sector      doorsector      local
  34.     thing       player          local
  35.  
  36.     flex        moveSpeed=0.5
  37.     flex        waittime
  38.     
  39.     sound       slidesound=teo_spike_block_c.wav        local
  40.     sound       stopit=gen_stone_stop_c.wav             local
  41.     
  42.     sound       indyline0=inxj001.wav                   local
  43.     sound       indyline1=inxj005.wav                   local
  44.     sound       indyline2=inxj151.wav                   local
  45.     sound       indyline3=inxj150.wav                   local
  46.         
  47.     int         itemnum
  48.     int            doorcount        local
  49.     int         bnosound0=0     local
  50.     int         bnosound1=0     local
  51.     int         soundchan0      local
  52.     int         linechannel     local
  53.     int         takecheck=0     local
  54. end
  55.  
  56. # ========================================================================================
  57.  
  58. code
  59.  
  60. # ........................................................................................
  61. startup:
  62.     doorsector=GetThingSector(door0);
  63.     SectorAdjoins(doorsector, 0);
  64.     player = GetLocalPlayerThing();
  65.     return;
  66.  
  67. # ........................................................................................
  68. activate:
  69.     //print("object taken");
  70.     if ((GetSenderRef() == idolkey) && (takecheck == 0))
  71.     {
  72.         takecheck = 1;
  73.         StartCutScene(1);
  74.         SetActorFlags(player, 0x200000);
  75.         StopThing(player);
  76.         PlayMode(player, 61, 0);
  77.         SetExtCamOffsetToThing(camera0);
  78.         SetExtCamLookOffsetToThing(target0);
  79.         linechannel = PlayVoice(player, indyline0[(RandBetween(0,3))], 1, 0);
  80.         Sleep(0.35);
  81.         DestroyThing(idolkey);
  82.         ChangeInv(player, itemnum, 1);
  83.         SetInvAvailable(player, itemnum, 1);
  84.         JonesInvItemChanged(itemnum);
  85.         WaitForSound(linechannel);
  86.         Sleep(1);
  87.         SectorAdjoins(doorsector, 1);
  88.         SetCameraFocus(2, camera1);
  89.         SetCameraSecondaryFocus(2, target1);
  90.         SetCurrentCamera(2);
  91.         MoveToFrame(target1, 1, 2);
  92.         WaitForStop(target1);
  93.         soundchan0 = PlaySoundThing(slidesound, door0, 1, 10, 20, 0x1);
  94.         for (doorcount=0; doorcount<=7; doorcount=doorcount+1)
  95.         {
  96.             MoveToFrame(door0[doorcount], 1, moveSpeed);
  97.         }
  98.         WaitForStop(door0);
  99.         StopSound(soundchan0, 0.5);
  100.         PlaySoundThing(stopit, door0, 1, 10, 20, 0x00);
  101.         Sleep(2);
  102.         SetCurrentCamera(1);
  103.         RestoreExtCam();
  104.         EndCutScene();
  105.         ClearActorFlags(player, 0x200000);
  106.     }
  107.     return;
  108.  
  109. end
  110.  
  111.